<?php
	/*
	 * Copyright 2009 Upskill.com.br
	 *
	 * Licensed under the Apache License, Version 2.0 (the "License");
	 * you may not use this file except in compliance with the License.
	 * You may obtain a copy of the License at
	 *
	 * http://www.apache.org/licenses/LICENSE-2.0
	 *
	 * Unless required by applicable law or agreed to in writing, software
	 * distributed under the License is distributed on an "AS IS" BASIS,
	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	 * See the License for the specific language governing permissions and
	 * limitations under the License.
 	 */
	class Professor {

		// Atributos
		private $id;
		private $nome;
		private $email;
		private $cursos;
		
		// Construtor da classe
		public function __construct($nome, $email){
			// $this->nome - acesso para o atributo nome
			$this->nome = $nome;
			$this->email = $email;
			$this->cursos = array();
		}
		
		// Metodos Get e Set
		public function getId(){
			return $this->id;
		}
		
		public function setId($id){
			$this->id = $id;
		}
		
		public function getNome(){
			return $this->nome;
		}

		public function setNome($nome){
			$this->nome = $nome;
		}
		
		public function getEmail(){
			return $this->email;
		}
		
		public function setEmail($email){
			$this->email = $email;
		}
		
		public function getCursos(){
			// Ira retornar um arrau de objetos curso
			return $this->cursos;
		}
		
		public function setCursos($arrayCursos){
			// Utilizado para substituir o array de curso
			$this->cursos = $arrayCursos;
		}
		
		/**
		 * Metodo para adicionar objetos curso no array
		 */
		public function addCurso($objCurso){
			// [] indica que o objeto entrara no final do array
			$this->cursos[] = $objCurso;
		}
		
	}

?>